<?php
//admin管理模块
class ceshi extends spController
{
	function __construct(){ // 公用
		parent::__construct(); // 这是必须的
		$this->tpl_title = "后台模块|主题部分";
	}
	
	function index()
	{ // 这里是首页
		$user=spClass('user');
		//dump($record->select());
		$conditions= array
		(
			"userid" => $_SESSION["userinfo"]["userid"],
		);
		$list = $user->findall();
		//dump($list);
		//$path = spClass('lib_part');
		$oDOMDocument=new DOMDocument('1.0','utf-8');
		$oDOMDocument->loadXML(spClass('lib_part')->BuildPartTreeXML());
		$oRootXMLNode=$oDOMDocument->documentElement->childNodes->item(0);
		 
		$this->fpart_list=spClass("lib_part")->BuildPartTreeLabel($oRootXMLNode);
		$this->select_fpartid=array($fpartid=>'selected');
		$this->disable_partid=array($result_part['partid']=>'disabled');//用于在栏目修改时，忽略当前目录。
		//dump(spClass("lib_part")->BuildPartTreeLabel($oRootXMLNode));
		


		$this->list=$list;
		$this->aacc=$this->shuchu();
		$this->contents = "后台模块首页内容";
		//$this->display("admin/ceshi_index.html");
	}
	
	function shuchu()
	{
		echo '这是实验';
		//dump($GLOBALS['G_SP']);
/*		
		$url = 'http://www.taobao.com';
		dump(get_headers($url));
		dump(get_headers($url, 1));
*/		
		dump($_REQUEST);
		$this->display("admin/ceshi_index.html");
	}
	function json()
	{
		$data= array('a'=>'1<br>','b'=>2,'c'=>3,'d'=>4,'e'=>5, 'f'=>6);
		echo json_encode($data);
		$this->display("admin/main_user.html");
	}
	function xml()
	{
		$xml = simplexml_load_file("runtime.xml");
		dump($xml);
		
		echo $xml->getName() . "<br />";

		foreach($xml->children() as $child)
  		{
  		echo $child->getName() . ": " . $child . "<br />";		
  		}
	}
	function url()
	{
		$data=array(qqq=>wwww,eee=>ttt);
		foreach($data as $k => $v){
   		 $url .= $k . "=" . $v . "&";
		};
		$_COOKIE["vewef"]="234235";
		$_SESSION["fwefweqqq"]="000999888777";
		echo $url;
		$da=$this->spArgs();
		dump($da);
		dump($_COOKIE);
		dump($_SESSION);
		dump($_SERVER);
		$GLOBALS['ooppss']="1241234324";
		//dump($GLOBALS);
		dump(ooppss);
	}
	function fff(){
		//$site=spClass("site");
		//$where["siteid"]="1";
		//$i = $site->findAll($where);
		//dump($site);
		//dump($i);
		$arr = array(
			adfe=>'Hello',
			dsfwef=>'World!',
			fewfwe=>'Beautiful',
			efwfwe=>'Day!');
			dump($arr);
		echo implode("-",$arr);
		
		$str = "Hello-World!-Beautiful-Day!";
		dump(explode("-",$str));
		
		
	}
}	